package com.consente.demo.service.impl;

import com.consente.demo.dao.DataDao;
import com.consente.demo.entity.Data;
import com.consente.demo.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("DataService")
public class DataServiceImpl implements DataService {

    @Autowired
    private DataDao dataDao;


    @Override
    public Data selectDataByCode(String code) {
        return dataDao.selectDataByCode(code);
    }

    @Override
    public int insert(Data data) {

      return   dataDao.insert(data);
    }

    @Override
    public int update(Data data) {
        return dataDao.update(data);
    }
}
